1. Field of the Invention
The present invention is related to an image processing apparatus, an image processing method, and an image processing program suited to positioning and synthesizing a plurality of images which are obtained by imaging a subject.
2. Description of the Related Art
There are conventional techniques for reducing blur within images obtained by imaging devices, such as digital cameras, caused due to camera shake, movement of subjects, and the like. An example of such a technique is that in which a plurality of imaging operations are performed with short exposure times that will not cause image blur to occur, then a plurality of images obtained by the plurality of imaging operations are positioned and synthesized. Another example of such a technique is that in which a plurality of images having parallax corresponding to different viewpoints are obtained by a compound lens camera, then the plurality of images are positioned and synthesized.
Japanese Unexamined Patent Publication No. 2004-035702 discloses a method, in which a plurality of feature points are extracted from a first image, which is to become a reference from among a plurality of images. Next, corresponding points that correspond to each of the feature points extracted from within the first image are obtained within a second image. Then, the coordinates of the positions of each pixel of the second image are converted such that the corresponding points match the feature points that they correspond to. Finally, the first image and the coordinate converted second image are synthesized.
This coordinate conversion is performed by dividing the second image into a plurality of triangular patches having three corresponding points as vertices. Then, the triangular patches undergo affine transformation such that the corresponding points overlap the feature points within the first image that the corresponding points correspond to (refer to U.S. Pat. No. 6,473,536).
In the coordinate converting method described above, all of the pixels within the triangular patches undergo affine transform, based on the positional relationships among the corresponding points that form the vertices of the triangular patches and the feature points that the corresponding points correspond to. For this reason, local deformations within images at the interiors of the triangular patches are not properly reflected, and there are cases in which images after coordinate conversion become unnaturally deformed. For example, in the case that two images, which are obtained by sequential photography of a car that moves against a still background, are positioned and synthesized, errors in correspondence become great at the borderline between the car region, at which large changes occur, and the still background region. Accordingly, there is a high probability that the outline of the car will become unnaturally deformed.
It is possible to reduce the amount of correspondence error between images by increasing the number of feature points which are extracted, that is, by decreasing the sizes of the triangular patches that the second image is divided into. However, there is a problem that such a solution greatly increases the amount of calculations necessary for positioning.